package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.WithDrawBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetTiXianMethods extends BaseMethods {

    private static GetTiXianMethods m_ins = null;

    public static GetTiXianMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetTiXianMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetTiXianMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "MyCase/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void withdraw(Subscriber<WithDrawBean> subscriber,
                      int mobile,
                      String checktype ) {
        Observable observable = initService().withdraw(System.currentTimeMillis()+"",
                "e785f07736bde4d62b77d03214d29647",mobile,checktype
        );
        toSubscribe(observable, subscriber);
    }
}
